<?php
//echo dirname($_SERVER['SCRIPT_NAME']);


echo $source_dir = (($sdir = dirname($_SERVER['SCRIPT_NAME'])) == '/' || $sdir == "\\") ? '' : $sdir;